package com.ly.erms.modular.system.warpper;

import java.util.Map;

import com.ly.erms.common.constant.factory.ConstantFactory;
import com.ly.erms.core.base.warpper.BaseControllerWarpper;
import com.ly.erms.core.util.ToolUtil;

/**
 * 部门列表包装
 * @author liuyang
 * @date 2018年1月8日
 */
public class DeptWarpper extends BaseControllerWarpper{

	public DeptWarpper(Object list) {
		super(list);
	}

	@Override
	protected void warpTheMap(Map<String, Object> map) {
	    Integer pid = (Integer) map.get("pid");

        if (ToolUtil.isEmpty(pid) || pid.equals(0)) {
            map.put("pName", "--");
        } else {
            map.put("pName", ConstantFactory.me().getDeptName(pid));
        }
		
	}
	
}
